<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>Linux</title>
    <meta name="generator" content="Muse">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <link rel="stylesheet" type="text/css"charset="utf-8" media="all" href="../../styles/common.css"  />

    <script src="../../scripts/jsMath/easy/load.js"></script>
  </head>

  <body>

    <h1>Linux
      <!-- menu start here -->
      <div class="menu">
        <div class="menuitem">
          <a href="../../home/index.html">Home</a>
        </div>
        <div class="menuitem">
          <a href="../../courses/index.html">Courses</a>
        </div>
        <div class="menuitem">
          <a href="../../projects/index.html">Projects</a>
        </div>
        <div class="menuitem">
          <a href="../../complang/index.html">CompLang</a>
        </div>
        <div class="menuitem">
          <a href="../../code/index.html">CodeReading</a>
        </div>
        <div class="menuitem">
          <a href="../../software/index.html">Software</a>
        </div>
        <div class="menuitem">
          <a href="../../lectures/index.html">Lectures</a>
        </div>
      </div>
      <!-- menu ends here -->

    </h1>


    <!-- Page published by Emacs Muse begins here -->

<h2>Shell</h2>

<ul>
<li><a href="shell.html#Put%20an%20already%20running%20process%20under%20nohup">shell#Put an already running process under nohup</a></li>
</ul>


<h2>Ubuntu</h2>

<h3>GPG error when running apt-get update</h3>

<pre class="src">
$ gpg --keyserver keyserver.ubuntu.com --recv 0c713da6
$ gpg --export --armor 0c713da6 | sudo apt-key add -
</pre>

<p>0c713da6 is the last 8 digits of your pubkey</p>


<h3>Disabling network manager</h3>

<pre class="src">
$ sudo update-rc.d NetworkManager remove
</pre>


<h3>Disabling routine check for disk drivers</h3>

<pre class="src">
sudo tune2fs -c 0 -i 0 /dev/sda1
</pre>



<h2>Fedora</h2>

<h3>Disabling network manager</h3>

<pre class="src">
$ sudo chkconfig --list NetworkManager
NetworkManager  0:off   1:off   2:on    3:on    4:on    5:on    6:off

$ sudo chkconfig --level 2345 NetworkManager off

$ sudo chkconfig --list NetworkManager
NetworkManager  0:off   1:off   2:off   3:off   4:off   5:off   6:off

$ sudo system-config-network

$ sudo /sbin/chkconfig --level 35 network on
</pre>



<h2>Entertainment</h2>

<h3>Encoding MP3 tags with UTF-8</h3>

<pre class="src">
$ sudo apt-get install python-mutagen
$ mid3iconv -e gbk *.mp3
</pre>



<h2>Makefile</h2>

<h3>Automatic Variables</h3>

<p class="first">Pasted from
&lt;<a href="http://www.gnu.org/software/make/manual/make.html#Automatic-Variables">http://www.gnu.org/software/make/manual/make.html#Automatic-Variables</a>&gt;</p>

<h4>$@</h4>

<p class="first">The file name of the target of the rule. If the target is an archive
member, then `$@' is the name of the archive file. In a pattern rule
that has multiple targets (see Introduction to Pattern Rules), `$@' is
the name of whichever target caused the rule's commands to be run.</p>


<h4>$%</h4>

<p class="first">The target member name, when the target is an archive member. See
Archives. For example, if the target is foo.a(bar.o) then `$%' is
bar.o and `$@' is foo.a. `$%' is empty when the target is not an
archive member.</p>


<h4>$&lt;</h4>

<p class="first">The name of the first prerequisite. If the target got its commands
from an implicit rule, this will be the first prerequisite added by
the implicit rule (see Implicit Rules).</p>


<h4>$?</h4>

<p class="first">The names of all the prerequisites that are newer than the target,
with spaces between them. For prerequisites which are archive members,
only the member named is used (see Archives).</p>


<h4>$^</h4>

<p class="first">The names of all the prerequisites, with spaces between them. For
prerequisites which are archive members, only the member named is used
(see Archives). A target has only one prerequisite on each other file
it depends on, no matter how many times each file is listed as a
prerequisite. So if you list a prerequisite more than once for a
target, the value of $^ contains just one copy of the name. This list
does not contain any of the order-only prerequisites; for those see
the `$|' variable, below.</p>


<h4>$+</h4>

<p class="first">This is like `$^', but prerequisites listed more than once are
duplicated in the order they were listed in the makefile. This is
primarily useful for use in linking commands where it is meaningful to
repeat library file names in a particular order.</p>


<h4>$|</h4>

<p class="first">The names of all the order-only prerequisites, with spaces between
them.</p>


<h4>$*</h4>

<p class="first">The stem with which an implicit rule matches (see How Patterns
Match). If the target is dir/a.foo.b and the target pattern is a.%.b
then the stem is dir/foo. The stem is useful for constructing names of
related files. In a static pattern rule, the stem is part of the file
name that matched the `%' in the target pattern.</p>

<p>In an explicit rule, there is no stem; so `$*' cannot be determined in
that way. Instead, if the target name ends with a recognized suffix
(see Old-Fashioned Suffix Rules), `$*' is set to the target name minus
the suffix. For example, if the target name is `foo.c', then `$*' is
set to `foo', since `.c' is a suffix. GNU make does this bizarre thing
only for compatibility with other implementations of make. You should
generally avoid using `$*' except in implicit rules or static pattern
rules.</p>

<p>If the target name in an explicit rule does not end with a recognized
suffix, `$*' is set to the empty string for that rule.</p>





<!-- Page published by Emacs Muse ends here -->
<hl />
<p />
<!-- <center> -->
<!--   Updated at  -->
<!--   2010-03-24 -->
<!-- </center> -->

<script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
  try {
  var pageTracker = _gat._getTracker("UA-2241833-12");
  pageTracker._trackPageview();
  } catch(err) {}</script>

</body>
</html>

